package com.kky.pp.activity.register

import android.content.Intent
import android.view.LayoutInflater
import android.view.View
import android.widget.EditText
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.isVisible
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.airbnb.lottie.LottieAnimationView
import com.appsflyer.AppsFlyerLib
import com.bumptech.glide.Glide
import com.custom.base.config.BaseConfig
import com.custom.base.entity.OkHttpBodyEntity
import com.custom.base.http.OkHttpFromBoy
import com.custom.base.http.OkHttpManager
import com.custom.base.http.SDOkHttpResoutCallBack
import com.custom.base.util.ToastUtil
import com.gyf.immersionbar.ImmersionBar
import com.kky.pp.common.Constant
import com.kky.pp.R
import com.kky.pp.base.GenderPreferListBean
import com.kky.pp.base.RegisterConfigBean
import com.kky.pp.base.TitleMvpBaseActivity
import com.kky.pp.popup.SelectPhotoPopup
import com.kky.pp.dot.DotLogEventName
import com.kky.pp.dot.DotLogUtil
import com.kky.pp.entity.BaseEntity
import com.kky.pp.adapter.GenderPreferAdapter
import com.kky.pp.adapter.PurposeAdapter
import com.kky.pp.databinding.ActivityRegisterStepBinding
import com.kky.pp.popup.SelectDataPopup
import com.kky.pp.util.DateUtils
import com.kky.pp.util.DensityUtil
import com.kky.pp.util.KeyboardUtils
import com.kky.pp.util.SoftInputUtils
import com.kky.pp.view.upImage.ImageClickListener
import com.kky.pp.view.upImage.UpImageView
import io.rong.imkit.SpName
import io.rong.imkit.utils.StatusBarUtil
import java.time.LocalDate
import java.util.Calendar
import java.util.stream.Collectors
import java.util.stream.Stream


class RegisterActivity : TitleMvpBaseActivity<RegisterContact.View, RegisterPresenter,ActivityRegisterStepBinding>(ActivityRegisterStepBinding::inflate),
    RegisterContact.View {
    var manAdapter: GenderPreferAdapter? = null
    var womanAdapter: GenderPreferAdapter? = null
    var queerAdapter: GenderPreferAdapter? = null
    var iwantAdapter: PurposeAdapter? = null
    var youAccpetAdapter: PurposeAdapter? = null
    private val keyboardUtils by lazy { KeyboardUtils() }
    var step: Int = 1
    val bgImageMap = hashMapOf<String, String>()
    override fun bindLayout(): Int {
        return R.layout.activity_register_step
    }

    override fun setFullScreen(): Boolean {
        return true
    }

    override fun getTitleTextView(tv: TextView) {

    }

    override val showBack: Boolean
        get() = false

    override fun onBackListener() {
        backClick()
    }

    private fun backClick() {
        when (step) {
            1 -> {
                finish()
            }

            2 -> {
                step = 1
                nicknameContainer.isVisible=false
                dateContainer.isVisible = true
                viewBinding.viewTitle.ivBackIcon.visibility = View.GONE
            }

            3 -> {
                step = 2
                nicknameContainer.isVisible=true
                genderContainer.isVisible=false
                viewBinding.viewTitle.ivBackIcon.visibility = View.VISIBLE
                upTitleBackVisibility(false)
            }

            4 -> {
                step = 3
                genderContainer.isVisible=true
                photoContainer.isVisible=false
                viewBinding.viewTitle.ivBackIcon.visibility = View.VISIBLE
            }

            5 -> {
                step = 4
                photoContainer.isVisible=true
                purposeContainer.isVisible=false
                viewBinding.viewTitle.ivBackIcon.visibility = View.VISIBLE
            }
        }
    }

    private fun laodBgImage(viewBg: ImageView, imageUrl: String, errorImageUrl: Int) {
        if (mPresenter?.loginRegisterHelper?.isNaturalFlow() == true) {
            viewBg.setImageResource(errorImageUrl)
        } else {
            Glide.with(this)
                .load(imageUrl)
                .error(errorImageUrl)
                .into(viewBg)
        }

    }

    override fun onBackPressed() {
        backClick()
    }

    override fun initView() {
//        dateContainer.animate().alpha(1f).setDuration(1000).start()
        mPresenter?.loginRegisterHelper?.initData(this@RegisterActivity) {
            val ageConfig =
                it.configs.stream().filter { it.pageType == 1 }.collect(Collectors.toList())
            bgImageMap["age"] = ageConfig[0].backgroundPhoto
            laodBgImage(
                dataViewBg,
                ageConfig[0].backgroundPhoto,
                R.mipmap.ic_register_age_default_bg
            )
            initConfigView(it)
        }
        upTitleBackVisibility(false)
        initListener()
        upLoadAdjuestChennelInfo()
    }

    private fun initConfigView(registerConfigBean: RegisterConfigBean) {
        val ageConfig = registerConfigBean.configs.stream().filter { it.pageType == 1 }
        initConfigAge(ageConfig)
        val nicknameConfig = registerConfigBean.configs.stream().filter { it.pageType == 2 }
        initConfigNickname(nicknameConfig)
        val genderConfig = registerConfigBean.configs.stream().filter { it.pageType == 3 }
        initConfigGender(genderConfig)
        val photoConfig = registerConfigBean.configs.stream().filter { it.pageType == 4 }
        initConfigPhoto(photoConfig)
        val iWantConfig = registerConfigBean.configs.stream().filter { it.pageType == 5 }
        initConfigIWant(iWantConfig)
    }

    private fun initConfigAge(collect: Stream<RegisterConfigBean.ConfigsBean>) {
        val ageConfig = collect.collect(Collectors.toList())
        if (ageConfig.isEmpty())
            return
        val configBean = ageConfig[0]
        val c = Calendar.getInstance()
        c.add(Calendar.YEAR, -18)
        txtShowDate.setPadding(
            0,
            StatusBarUtil.getStatusBarHeight(mActivity) + DensityUtil.dip2px(this, 60f),
            0,
            0
        )
        val timeCross = DateUtils.getTimeCross(c.time)
        txtDate.text=DateUtils.getMonth()[Calendar.MONTH]+ timeCross.substring(timeCross.indexOf("-"))
        txtDate.setOnClickListener {
            SelectDataPopup(mActivity,txtDate.text.toString(),object : SelectDataPopup.OnCallBack{
                override fun callBack(date: String) {
                    txtDate.text=date
                    val age = LocalDate.now().year - date.substring(date.lastIndexOf("-")+1).toInt()
                    txtDateNext.text="I’m $age years old"
                }

            }).showPopupWindow()
        }
        txtShowDate.text = configBean.firstTitle ?: ""
        txtShowDate.visibility =
            if (configBean.firstTitle.isNullOrEmpty()) View.INVISIBLE else View.VISIBLE
        selectDateTips.text = configBean.firstContent ?: ""
        selectDateTips.isVisible= !configBean.firstContent.isNullOrEmpty()
        txtShowAgeBottomHint.text = configBean.additional ?: ""
        txtShowAgeBottomHint.visibility =
            if (configBean.additional.isNullOrEmpty()) View.INVISIBLE else View.VISIBLE
        viewBinding.viewTitle.ivBackIcon.visibility = View.VISIBLE
        laodBgImage(nicknameViewBg, configBean.backgroundPhoto, R.mipmap.ic_register_age_default_bg)
    }

    private fun initConfigNickname(collect: Stream<RegisterConfigBean.ConfigsBean>) {
        val ageConfig = collect.collect(Collectors.toList())
        if (ageConfig.isEmpty())
            return
        val configBean = ageConfig[0]
        bgImageMap["nickName"] = configBean.backgroundPhoto
        editNickname.setText(configBean.nickName ?: "")
        txtShowNameBottomHint.text = configBean.additional ?: ""
        txtShowNameBottomHint.visibility =
            if (configBean.additional.isNullOrEmpty()) View.INVISIBLE else View.VISIBLE
        txtShowName.text = configBean.firstTitle ?: ""
        txtShowName.visibility =
            if (configBean.firstTitle.isNullOrEmpty()) View.INVISIBLE else View.VISIBLE
        txtShowNameHint.text = configBean.firstContent ?: ""
        txtShowNameHint.visibility =
            if (configBean.firstContent.isNullOrEmpty()) View.INVISIBLE else View.VISIBLE
        txtNicknameNext.isEnabled = editNickname.text.toString().isNotEmpty()
        txtNicknameNext.alpha = if (editNickname.text.toString().isNotEmpty()) 1f else 0.5f
        laodBgImage(
            nicknameViewBg,
            configBean.backgroundPhoto,
            R.mipmap.ic_register_name_default_bg
        )
        txtShowName.setPadding(
            0,
            StatusBarUtil.getStatusBarHeight(mActivity) + DensityUtil.dip2px(this, 60f),
            0,
            0
        )
    }

    private fun initConfigGender(collect: Stream<RegisterConfigBean.ConfigsBean>) {
        val ageConfig = collect.collect(Collectors.toList())
        if (ageConfig.isEmpty())
            return
        val configBean = ageConfig[0]
        bgImageMap["gender"] = configBean.backgroundPhoto
        mPresenter?.setGender(1)
        initGenderClickListener()
        txtGenderDefine.text = configBean.firstTitle ?: ""
        txtGenderDefine.visibility =
            if (configBean.firstTitle.isNullOrEmpty()) View.INVISIBLE else View.VISIBLE

        txtPreferDefine.text = configBean.secondTitle ?: ""
        txtPreferDefine.isVisible =!configBean.secondTitle.isNullOrEmpty()

        txtPreferDefineTip.isVisible =!configBean.secondContent.isNullOrEmpty()
        txtPreferDefineTip.text = configBean.secondContent ?: ""

        if (txtPreferDefine.isVisible) {
            viewBinding.rvRegisterStepPreferList.layoutManager = GridLayoutManager(this@RegisterActivity, 2)
            val bodyShapeForMan = configBean.bodyShapeForMan ?: arrayListOf()
            manAdapter = setAdapter(bodyShapeForMan)
            manAdapter?.allData = bodyShapeForMan

            val bodyShapeForWoman = configBean.bodyShapeForWoman ?: arrayListOf()
            womanAdapter = setAdapter(bodyShapeForWoman)
            womanAdapter?.allData = bodyShapeForWoman

            queerAdapter = setAdapter(configBean.bodyShapeForQueer ?: arrayListOf())
            viewBinding.rvRegisterStepPreferList.adapter = manAdapter
        }
        upDataBottomStyle(bntGenderNext, (manAdapter?.dataList) ?: arrayListOf(),!txtPreferDefine.isVisible)

        laodBgImage(
            genderViewBg,
            configBean.backgroundPhoto,
            R.mipmap.ic_register_gender_default_bg
        )
        txtGenderDefine.setPadding(
            0,
            StatusBarUtil.getStatusBarHeight(mActivity) + DensityUtil.dip2px(this, 60f),
            0,
            0
        )
    }

    private fun setAdapter(genderPreferListBeans: ArrayList<GenderPreferListBean>): GenderPreferAdapter {
        return GenderPreferAdapter(
            mActivity,
            genderPreferListBeans,
            object : GenderPreferAdapter.OnListener {
                override fun onListener(adapter: GenderPreferAdapter, position: Int) {
                    val bean = adapter.dataList[position]
                    bean.selected = if (bean.selected == 1) 0 else 1
                    adapter.notifyItemChanged(position)
                    upDataBottomStyle(bntGenderNext, adapter.dataList)
                }
            })
    }

    private fun initConfigPhoto(collect: Stream<RegisterConfigBean.ConfigsBean>) {
        val ageConfig = collect.collect(Collectors.toList())
        if (ageConfig.isEmpty())
            return
        val configBean = ageConfig[0]
        bgImageMap["photo"] = configBean.backgroundPhoto
        photoTitle.text = configBean.firstTitle ?: ""
        photoTitle.visibility =
            if (configBean.firstTitle.isNullOrEmpty()) View.INVISIBLE else View.VISIBLE

        photoTitleHint.text = configBean.firstContent ?: ""
        photoTitleHint.visibility =
            if (configBean.firstContent.isNullOrEmpty()) View.INVISIBLE else View.VISIBLE
        laodBgImage(photoViewBg, configBean.backgroundPhoto, R.mipmap.ic_register_photo_default_bg)
        photoTitle.setPadding(
            0,
            StatusBarUtil.getStatusBarHeight(mActivity) + DensityUtil.dip2px(this, 60f),
            0,
            0
        )
        viewBinding.viewUpImageView.addImageClickListener(object : ImageClickListener {
            override fun imageClick(isAdd: Boolean) {
                if (isAdd) {
                    SelectPhotoPopup(mActivity).showPopupWindow()
                } else {
                    mPresenter?.deleteImage(viewBinding.viewUpImageView)
                }

            }
        })

    }

    private fun initConfigIWant(collect: Stream<RegisterConfigBean.ConfigsBean>) {
        val ageConfig = collect.collect(Collectors.toList())
        if (ageConfig.isEmpty())
            return
        val configBean = ageConfig[0]
        bgImageMap["iwant"] = configBean.backgroundPhoto
        txtWantTitle.text = configBean.firstTitle ?: ""
        txtWantTitle.isVisible = !configBean.firstTitle.isNullOrEmpty()
        txtWantTip.text = configBean.firstContent ?: ""
        txtWantTip.isVisible = !configBean.firstContent.isNullOrEmpty()


        iwantList.layoutManager = LinearLayoutManager(this@RegisterActivity)
        iwantAdapter = PurposeAdapter(this@RegisterActivity, configBean.iwantList, false,
            isRequired = true,
            onClickListener = object : PurposeAdapter.OnClickListener() {
                override fun selected(position: Int) {
                    txtLookingNext.isEnabled = true
                    textLookingNext.isEnabled = true
                    txtLookingNext.setBackgroundResource(if (txtLookingNext.isEnabled)R.drawable.ic_button_bg_radius_25 else R.drawable.ic_button_bg_radius_25_unable)
                }

            })
        iwantList.adapter = iwantAdapter

        txtAccpetTitle.text = configBean.secondTitle ?: ""
        txtAccpetTitle.isVisible =!configBean.secondTitle.isNullOrEmpty()
        if (txtAccpetTitle.isVisible) {
            accpetList.layoutManager = LinearLayoutManager(this@RegisterActivity)
            youAccpetAdapter = PurposeAdapter(this@RegisterActivity, arrayListOf(), true, false)
            //Man / Queer使用同一个
            youAccpetAdapter?.setAcceptForWomen(configBean.youAcceptForWomen)
            youAccpetAdapter?.setAcceptForMan(configBean.youAcceptForMan)
            youAccpetAdapter?.setAcceptForQueer(configBean.getYouAcceptQueer())
            accpetList.adapter = youAccpetAdapter
        }
        laodBgImage(iwantViewBg, configBean.backgroundPhoto, R.mipmap.ic_register_iwant_default_bg)
        txtWantTitle.setPadding(
            0,
            StatusBarUtil.getStatusBarHeight(mActivity) + DensityUtil.dip2px(this, 60f),
            0,
            0
        )
        txtLookingNext.isEnabled = false

    }

    private fun initGenderClickListener() {
        maleContainer.setOnClickListener {
            viewBinding.rvRegisterStepPreferList.adapter = manAdapter
            setSelectGenderStyle(
                true,
                maleContainer,
            )
            setSelectGenderStyle(
                false,
                womanContainer,
            )
            setSelectGenderStyle(
                false,
                queerContainer,
            )
            upDataBottomStyle(bntGenderNext, (manAdapter?.dataList) ?: arrayListOf(),!txtPreferDefine.isVisible)
            mPresenter?.setGender(1)
            txtPreferDefine.isVisible =!txtPreferDefine.text.isNullOrEmpty()

            txtPreferDefineTip.isVisible =!txtPreferDefineTip.text.isNullOrEmpty()
        }
        womanContainer.setOnClickListener {
            viewBinding.rvRegisterStepPreferList.adapter = womanAdapter
            setSelectGenderStyle(
                false,
                maleContainer,
            )
            setSelectGenderStyle(
                true,
                womanContainer,
            )
            setSelectGenderStyle(
                false,
                queerContainer,
            )
            upDataBottomStyle(bntGenderNext, (womanAdapter?.dataList) ?: arrayListOf(),!txtPreferDefine.isVisible)
            mPresenter?.setGender(2)
            txtPreferDefine.isVisible =!txtPreferDefine.text.isNullOrEmpty()

            txtPreferDefineTip.isVisible =!txtPreferDefineTip.text.isNullOrEmpty()
        }
        queerContainer.setOnClickListener {
            viewBinding.rvRegisterStepPreferList.adapter = queerAdapter
            setSelectGenderStyle(
                false,
                maleContainer,
            )
            setSelectGenderStyle(
                false,
                womanContainer,
            )
            setSelectGenderStyle(
                true,
                queerContainer,
            )
            txtPreferDefine.isVisible =false

            txtPreferDefineTip.isVisible =false
            upDataBottomStyle(bntGenderNext, (queerAdapter?.dataList) ?: arrayListOf(), true)
            mPresenter?.setGender(0)
        }
    }

    private fun upDataBottomStyle(
        bottomBnt: TextView,
        genderPreferListBeans: List<GenderPreferListBean>,
        isEnabled: Boolean = false
    ) {
        val list =
            genderPreferListBeans.stream().filter { it.selected == 1 }.collect(Collectors.toList())
        bottomBnt.isEnabled = list.isNotEmpty() || isEnabled
    }

    private fun setSelectGenderStyle(
        select: Boolean,
        tv: TextView,
    ) {
        tv.setBackgroundResource(if (select) R.drawable.shape_4634a9_f63669_radius_25 else R.drawable.shape_283040_radius_25)
    }

    private fun upLoadAdjuestChennelInfo() {
        try {
            OkHttpManager.instance.requestInterface(object : OkHttpFromBoy {
                override fun addBody(requestBody: OkHttpBodyEntity) {
                    requestBody.setPost(Constant.user_addAppflyer_info_url)
                    AppsFlyerLib.getInstance().getAppsFlyerUID(mActivity)
                        ?.let { requestBody.add("appsFlyerUid", it) }
                    requestBody.add("channel", BaseConfig.getInstance.getString(SpName.channel, ""))
                }
            }, object : SDOkHttpResoutCallBack<BaseEntity>() {
                override fun onSuccess(entity: BaseEntity) {
                    //保存已经上传adjust channel 信息 状态
                    BaseConfig.getInstance.setBoolean(SpName.isAlreadyUpAdjuestChannelInfo, true)
                }
            })
        } catch (e: Exception) {
        }
    }

    private fun initListener() {
        txtDateNext.setOnClickListener {
            step = 2
            nicknameContainer.isVisible=true
            dateContainer.isVisible=false
            DotLogUtil.setEventName(DotLogEventName.USER_PROFILE_BIRTHDAY_ON_NEXT_CLICK)
                .commit()
            viewBinding.viewTitle.ivBackIcon.visibility = View.VISIBLE
            SoftInputUtils.hideSoftInput(editNickname)
        }
        txtNicknameNext.setOnClickListener {
            var text = editNickname.text.toString()
            text = text.trim()
            if (text.isEmpty()) {
                ToastUtil.toast(mActivity.getString(R.string.the_nickname_is_not_valid))
                return@setOnClickListener
            }
            step = 3
            genderContainer.isVisible=true
            nicknameContainer.isVisible=false
            upTitleBackVisibility(true)
            viewBinding.viewTitle.ivBackIcon.visibility = View.VISIBLE
            DotLogUtil.setEventName(DotLogEventName.USER_PROFILE_NICKNAME_ON_NEXT_CLICK).commit()
            SoftInputUtils.hideSoftInput(editNickname)
        }

        bntGenderNext.setOnClickListener {
            step = 4
            photoContainer.isVisible=true
            genderContainer.isVisible=false
            when (mPresenter?.getGender()) {
                0 -> {
                    DotLogUtil.setEventName(DotLogEventName.USER_PROFILE_GENDER_ON_NEXT_CLICK)
                        .commit()
                }

                2 -> {
                    DotLogUtil.setEventName(DotLogEventName.USER_PROFILE_GENDER_ON_NEXT_CLICK)
                        .commit()
                }

                1 -> {
                    DotLogUtil.setEventName(DotLogEventName.USER_PROFILE_GENDER_ON_NEXT_CLICK)
                        .commit()
                }
            }
        }
        txtPhotoNext.setOnClickListener {
            showIwant(youAccpetAdapter)
            upLoadAdjuestChennelInfo()
        }
        txtPhotoSkip.setOnClickListener {
            showIwant(youAccpetAdapter)
            upLoadAdjuestChennelInfo()
        }
        keyboardUtils.registerKeyboardHeightListener(this@RegisterActivity, viewBinding.conRegisterStepViewNickName)
    }

    private fun showIwant(youAccpetAdapter: PurposeAdapter?) {
        step = 5
        purposeContainer.isVisible=true
        photoContainer.isVisible=false
        DotLogUtil.setEventName(DotLogEventName.USER_PROFILE_UPLOAD_ON_NEXT_CLICK).commit()
        val youAccpetData = if (mPresenter?.getGender() == 0) {
            youAccpetAdapter?.youAcceptForQueer
        } else if (mPresenter?.getGender() == 1) {
            youAccpetAdapter?.youAcceptForMan
        } else if (mPresenter?.getGender() == 2) {
            youAccpetAdapter?.youAcceptForWomen
        } else {
            youAccpetAdapter?.youAcceptForMan
        }
        youAccpetAdapter?.clear()
        youAccpetAdapter?.dataList = youAccpetData!!
        youAccpetAdapter?.notifyDataSetChanged()
    }

    override fun onDestroy() {
        super.onDestroy()
        keyboardUtils.unregisterKeyboardHeightListener(this@RegisterActivity)
    }

    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        super.onActivityResult(requestCode, resultCode, data)
        mPresenter?.onActivityResult(requestCode, resultCode, data)
    }

    override fun onResume() {
        super.onResume()
        ImmersionBar.with(mActivity).statusBarDarkFont(false).init()
    }

    override val actionLoading: LottieAnimationView
        get() = viewBinding.actionLoading

    override val tvNameExceedHint: TextView
        get() = viewBinding.tvNameExceedHint

    override val viewUpImageView: UpImageView
        get() = viewBinding.viewUpImageView

    override val nicknameContainer: ConstraintLayout
        get() = viewBinding.conRegisterStepNicknameContainer
    override val editNickname: EditText
        get() = viewBinding.editRegisterStepNickname
    override val txtNicknameNext: TextView
        get() = viewBinding.txtRegisterStepNicknameNext
    override val dateContainer: ConstraintLayout
        get() = viewBinding.conRegisterStepDateContainer
    override val txtDateNext: TextView
        get() = viewBinding.txtRegisterStepDateNext
    override val txtShowDate: TextView
        get() = viewBinding.txtRegisterStepShowDate
    override val txtDate: TextView
        get() = viewBinding.txtRegisterStepDate
    override val genderContainer: ConstraintLayout
        get() = viewBinding.conRegisterStepGenderContainer
    override val txtGenderDefine: TextView
        get() = viewBinding.txtRegisterStepGenderDefine
    override val txtPhotoNext: TextView
        get() = viewBinding.txtRegisterStepPhotoNext
    override val txtPhotoSkip: TextView
        get() = viewBinding.txtRegisterStepPhotoSkip
    override val photoTitle: TextView
        get() = viewBinding.txtRegisterStepPhotoTitle
    override val photoTitleHint: TextView
        get() = viewBinding.txtRegisterStepPhotoTitleHint
    override val photoContainer: ConstraintLayout
        get() = viewBinding.conRegisterStepPhotoContainer
    override val purposeContainer: ConstraintLayout
        get() = viewBinding.conRegisterStepPurposeContainer
    override val txtLookingNext: LinearLayout
        get() = viewBinding.linearRegisterStepLookingNext
    override val iwantList: RecyclerView
        get() = viewBinding.rvRegisterStepIWantList
    override val accpetList: RecyclerView
        get() = viewBinding.rvRegisterStepAccpetList
    override val txtWantTitle: TextView
        get() = viewBinding.txtRegisterStepWantTitle
    override val txtWantTip: TextView
        get() = viewBinding.txtRegisterStepWantTip
    override val txtAccpetTitle: TextView
        get() = viewBinding.txtRegisterStepAcceptTitle
    override val textLookingNext: TextView
        get() = viewBinding.txtRegisterStepLookingNext
    override val txtShowName: TextView
        get() = viewBinding.txtRegisterStepShowName
    override val txtShowNameHint: TextView
        get() = viewBinding.txtRegisterStepShowNameHint
    override val txtShowNameBottomHint: TextView
        get() = viewBinding.txtReisterStepShowNameBottomHint
    override val selectDateTips: TextView
        get() = viewBinding.txtRegisterStepSelectDateTips
    override val txtShowAgeBottomHint: TextView
        get() = viewBinding.txtReisterStepShowAgeBottomHint
    override val dataViewBg: ImageView
        get() = viewBinding.imageViewRegisterStepDateViewBg
    override val nicknameViewBg: ImageView
        get() = viewBinding.imgViewRegisterStepNickNameViewBg
    override val genderViewBg: ImageView
        get() = viewBinding.imgViewRegisterStepGenderViewBg
    override val iwantViewBg: ImageView
        get() = viewBinding.imgViewRegisterStepPurposeViewBg
    override val photoViewBg: ImageView
        get() = viewBinding.imgViewRegisterStepPhotoViewBg
    override val womanContainer: TextView
        get() = viewBinding.txtRegisterStepWomanContainer
    override val queerContainer: TextView
        get() = viewBinding.txtRegisterStepQueerContainer
    override val maleContainer: TextView
        get() = viewBinding.txtRegisterStepMaleContainer
    override val txtPreferDefine: TextView
        get() = viewBinding.txtRegisterStepPreferDefine
    override val txtPreferDefineTip: TextView
        get() = viewBinding.txtRegisterStepPreferDefineTip
    override val bntGenderNext: TextView
        get() = viewBinding.txtRegisterStepGenderNext
    override val tvMiddleTitle: TextView?
        get() = viewBinding.viewTitle.tvMiddleTitle
    override val tvRightTitle: TextView?
        get() = viewBinding.viewTitle.tvRightTitle
    override val ivLeftImage: ImageView?
        get() = viewBinding.viewTitle.ivBackIcon
    override val viewStatusHeight: View?
        get() = viewBinding.viewTitle.viewStatusHeight

}